/* 礼物墙 */
<template>
  <div class="app-container">

    <el-table v-loading="loading" :data="userGiftDetailList">
      <el-table-column label="礼物图片" align="center">
        <template slot-scope="scope">
          <el-image v-if="scope.row.giftImage" style="width: 50px; height: 50px" 
          :src="scope.row.giftImage" :preview-src-list="[scope.row.giftImage]" />
        </template>
      </el-table-column>
      <el-table-column label="礼物名称" align="center" prop="giftName" />
      <el-table-column label="获得数量" align="center" prop="giftNumbers" />
      <el-table-column label="获得来源" align="center" prop="giftText" />
      <el-table-column label="共赠送人" align="center" prop="giftSends" />
    </el-table>
    

  </div>
</template>

<script>
import { listCatUserGiftList } from "@/api/system/catUserAccount";
export default {
  data() {
    return {
      // 遮罩层
      loading: true,
      // 总条数
      total: 0,
      userGiftDetailList: [],
      // 查询参数
      queryParams: {
        pageNum: 1,
        pageSize: 10,
        userId: undefined,
      },

      userId:undefined,
    };
  },
  created() {
    
  },
  methods: {
    /** 查询用户登录日志列表 */
    getList() {
      this.loading = true;
      listCatUserGiftList(this.userId).then(response => {
        this.userGiftDetailList = response.data;
        this.loading = false;
      });
    },
    init(userId){
      this.userId = userId
      this.getList();
    }
  }
};
</script>